package com.sohu.sip.group.client.impl;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;



public class ProxyInvocationHandler implements InvocationHandler{

	private InvocationSerializer serializer;
	
	public ProxyInvocationHandler(String remoteInterface)throws ClassNotFoundException{
		this.serializer = InvocationSerializer.getInstance(remoteInterface);
	}

	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		return serializer.serialize(proxy, method, args);
	}

}
